-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add a vertical_overflow='crop_above'
as an option to Live()
#3637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add a vertical_overflow='crop_above'
as an option to Live()
#3637
Conversation
👍 |
would love to see this! @willmcgugan - if we can get a r? |
This feature would be amazing for CLI LLM chat apps! |
@willmcgugan sorry to spam you. I wanted to frame this a bit and why I think it's super important. LLM agents are proliferating pretty wildly at the moment, and one of the quickest ways to build really effective UIs to give users access to them is via CLIs. IMO, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to need an update to the docs (live.rst)
You would be better off using Textual for LLM output. Better Markdown rendering as well. |
Type of changes
Checklist
Description
As described in #3263,
Live(vertical_overflow="visible")
has the unfortunate behavior of duplicating content when the content update exceeds the height of the console. This is especially unfortunate for a few reasons:transient=True
doesn't help to avoid this).vertical_overflow
options that allows for the "newest" content to be visible.This PR proposes a new option
vertical_overflow="crop_above"
which does the reverse ofvertical_overflow="crop"
(it displays only the bottom portion of the content instead of the top). It has the nice behavior of always making the "newest" content visible, but without the downside of duplicated content. Here's a demo:rich-crop-above.mp4
And note that if you change
vertical_overflow="crop_above"
tovertical_overflow="visible"
, this is the behavior:rich-visible.mp4
I'm happy to write tests or anything else you need if you like this overall direction